﻿function clearNoNum(obj) {
    //先把非数字的都替换掉，除了数字和.
    obj.value = obj.value.replace(/[^\d.]/g, "");
    //必须保证第一个为数字而不是.
    obj.value = obj.value.replace(/^\./g, "");
    //保证只有出现一个.而没有多个.
    obj.value = obj.value.replace(/\.{2,}/g, ".");
    //保证.只出现一次，而不能出现两次以上
    obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
}

//选中全部CHECKBOX
function OtherCheckAll() {
    var InputList = document.getElementsByTagName("input");
    var InputAll = document.getElementById("CheckAllBox");
    for (var j = 0; j < InputList.length; j++) {
        if (InputList[j].type == "checkbox" && InputList[j].id.indexOf('CheckBoxID') != -1) {
            InputList[j].checked = InputAll.checked == true ? true : false;
            if (InputList[j].checked == true) {
                InputList[j].parentNode.parentNode.style.backgroundColor = '#F7F7F7';
                InputList[j].parentNode.parentNode.IsSelected = "1";
            } else {
                InputList[j].parentNode.parentNode.style.backgroundColor = '#ffffff';
                InputList[j].parentNode.parentNode.IsSelected = "0";
            }
        }
    }
}

//----------------------------------------------------
//选中DataGridView中对应列的全部CHECKBOX
//obj   string      DataGridView的id
//col   int         选取列所在位置
//chk   string      CheckAllBox的id
//
//注意，该列中，第一个INPUT项目必须是要操作的Checkbox
//
//----------------------------------------------------
function CheckAllByGridView(obj, col, chk) {
    try {
        //剥离<TBODY>标签
        var DataGridView = childs(document.getElementById(obj).childNodes)[0];
        var CheckAllBox = document.getElementById(chk);

        //从1开始，直接排除掉表头
        for (var i = 1; i < childs(DataGridView.childNodes).length; i++) {
            //剥离<TR>标签
            var objTR = childs(DataGridView.childNodes)[i];

            //剥离<TD>标签
            var objCol = childs(objTR.childNodes)[col];

            //剥离<INPUT>标签
            var checkbox = childs(objCol.childNodes)[0];

            checkbox.checked = CheckAllBox.checked;
            if (checkbox.checked) {
                objTR.style.backgroundColor = '#F7F7F7';
                objTR.IsSelected = "1";
            }
            else {
                objTR.style.backgroundColor = '#F7F7F7';
                objTR.IsSelected = "0";
            }
        }
    }
    catch (e) {
    }
}

function CheckAll(form, chkname) {
    if (form == '' || form == null) {
        OtherCheckAll();
    } else {
        for (var i = 0; i < form.elements.length; i++) {
            var e = form.elements[i];
            if (typeof chkname == 'undefined' || chkname == "" || chkname == null) {
                if (e.type == "checkbox" && e.name != 'chkall' && e.name != 'deleteMode') {
                    e.checked = form.chkall.checked;
                }
            } else {
                if (e.type == "checkbox" && e.name != 'chkall' && e.name != 'deleteMode' && e.name == chkname) {
                    e.checked = form.chkall.checked;
                }
            }
        }
    }
}

function SelectAllCheckboxes(inputChk,spanChk) {

    // Added as ASPX uses SPAN for checkbox
    var oItem = spanChk.childNodes;
    xState = inputChk.checked;

    for (i = 0; i < oItem.length; i++) {
        if (oItem[i].type == "checkbox") {
            oItem[i].checked = xState;
        }
    }
}

var userAgent = navigator.userAgent.toLowerCase();
var is_opera = userAgent.indexOf('opera') != -1 && opera.version();
var is_moz = (navigator.product == 'Gecko') && userAgent.substr(userAgent.indexOf('firefox') + 8, 3);
var is_ie = (userAgent.indexOf('msie') != -1 && !is_opera) && userAgent.substr(userAgent.indexOf('msie') + 5, 3);
var is_mac = userAgent.indexOf('mac') != -1;

//-------------------------------------------------------------浮动展示--------------------------------------------------------------------
var InFloat = '';
var jsmenu = new Array();
var ctrlobjclassName;
jsmenu['active'] = new Array();
jsmenu['timer'] = new Array();
jsmenu['iframe'] = new Array();

//判定dom类型是否定义
function isUndefined(variable) {
    return typeof variable == 'undefined' ? true : false;
}

function doane(event) {
    e = event ? event : window.event;
    if (is_ie) {
        e.returnValue = false;
        e.cancelBubble = true;
    } else if (e) {
        e.stopPropagation();
        e.preventDefault();
    }
}

function initCtrl(ctrlobj, click, duration, timeout, layer) {
    if (ctrlobj && !ctrlobj.initialized) {
        ctrlobj.initialized = true;
        ctrlobj.unselectable = true;

        ctrlobj.outfunc = typeof ctrlobj.onmouseout == 'function' ? ctrlobj.onmouseout : null;
        ctrlobj.onmouseout = function() {
            if (this.outfunc) this.outfunc();
            if (duration < 3 && !jsmenu['timer'][ctrlobj.id]) jsmenu['timer'][ctrlobj.id] = setTimeout('hideMenu(' + layer + ')', timeout);
        }

        ctrlobj.overfunc = typeof ctrlobj.onmouseover == 'function' ? ctrlobj.onmouseover : null;
        ctrlobj.onmouseover = function(e) {
            doane(e);
            if (this.overfunc) this.overfunc();
            if (click) {
                clearTimeout(jsmenu['timer'][this.id]);
                jsmenu['timer'][this.id] = null;
            } else {
                for (var id in jsmenu['timer']) {
                    if (jsmenu['timer'][id]) {
                        clearTimeout(jsmenu['timer'][id]);
                        jsmenu['timer'][id] = null;
                    }
                }
            }
        }
    }
}

function initMenu(ctrlid, menuobj, duration, timeout, layer, drag) {
    if (menuobj && !menuobj.initialized) {
        menuobj.initialized = true;
        menuobj.ctrlkey = ctrlid;
        menuobj.onclick = ebygum;
        menuobj.style.position = 'absolute';
        if (duration < 3) {
            if (duration > 1) {
                menuobj.onmouseover = function() {
                    clearTimeout(jsmenu['timer'][ctrlid]);
                    jsmenu['timer'][ctrlid] = null;
                }
            }
            if (duration != 1) {
                menuobj.onmouseout = function() {
                    jsmenu['timer'][ctrlid] = setTimeout('hideMenu(' + layer + ')', timeout);
                }
            }
        }
        menuobj.style.zIndex = 999 + layer;
        if (ctrlid.indexOf("calendarexp") != -1)
            menuobj.style.zIndex = 10003;
        if (drag) {
            menuobj.onmousedown = function(event) { try { menudrag(menuobj, event, 1); } catch (e) { } };
            menuobj.onmousemove = function(event) { try { menudrag(menuobj, event, 2); } catch (e) { } };
            menuobj.onmouseup = function(event) { try { menudrag(menuobj, event, 3); } catch (e) { } };
        }
    }
}

function showMenu(ctrlid, click, offset, duration, timeout, layer, showid, maxh, drag) {
    var ctrlobj = $(ctrlid);
    if (!ctrlobj) return;
    if (isUndefined(click)) click = false;
    if (isUndefined(offset)) offset = 0;
    if (isUndefined(duration)) duration = 2;
    if (isUndefined(timeout)) timeout = 250;
    if (isUndefined(layer)) layer = 0;
    if (isUndefined(showid)) showid = ctrlid;
    var showobj = $(showid);
    var menuobj = $(showid + '_menu');
    if (!showobj || !menuobj) return;
    if (isUndefined(maxh)) maxh = 400;
    if (isUndefined(drag)) drag = false;

    if (click && jsmenu['active'][layer] == menuobj) {
        hideMenu(layer);
        return;
    } else {
        hideMenu(layer);
    }

    var len = jsmenu['timer'].length;
    if (len > 0) {
        for (var i = 0; i < len; i++) {
            if (jsmenu['timer'][i]) clearTimeout(jsmenu['timer'][i]);
        }
    }

    initCtrl(ctrlobj, click, duration, timeout, layer);
    ctrlobjclassName = ctrlobj.className;
    ctrlobj.className += ' hover';
    initMenu(ctrlid, menuobj, duration, timeout, layer, drag);

    menuobj.style.display = '';
    if (!is_opera) {
        menuobj.style.clip = 'rect(auto, auto, auto, auto)';
    }

    setMenuPosition(showid, offset);

    if (maxh && menuobj.scrollHeight > maxh) {
        menuobj.style.height = maxh + 'px';
        if (is_opera) {
            menuobj.style.overflow = 'auto';
        } else {
            menuobj.style.overflowY = 'auto';
        }
    }

    if (!duration) {
        setTimeout('hideMenu(' + layer + ')', timeout);
    }

    jsmenu['active'][layer] = menuobj;
}

function setMenuPosition(showid, offset) {
    var showobj = $(showid);
    var menuobj = $(showid + '_menu');
    if (isUndefined(offset)) offset = 0;
    if (showobj) {
        showobj.pos = fetchOffset(showobj);
        showobj.X = showobj.pos['left'];
        showobj.Y = showobj.pos['top'];
        if ($(InFloat) != null) {
            var InFloate = InFloat.split('_');
            if (!floatwinhandle[InFloate[1] + '_1']) {
                floatwinnojspos = fetchOffset($('floatwinnojs'));
                floatwinhandle[InFloate[1] + '_1'] = floatwinnojspos['left'];
                floatwinhandle[InFloate[1] + '_2'] = floatwinnojspos['top'];
            }
            showobj.X = showobj.X - $(InFloat).scrollLeft - parseInt(floatwinhandle[InFloate[1] + '_1']);
            showobj.Y = showobj.Y - $(InFloat).scrollTop - parseInt(floatwinhandle[InFloate[1] + '_2']);
            InFloat = '';
        }
        showobj.w = showobj.offsetWidth;
        showobj.h = showobj.offsetHeight;
        menuobj.w = menuobj.offsetWidth;
        menuobj.h = menuobj.offsetHeight;
        if (offset < 3) {
            menuobj.style.left = (showobj.X + menuobj.w > document.body.clientWidth) && (showobj.X + showobj.w - menuobj.w >= 0) ? showobj.X + showobj.w - menuobj.w + 'px' : showobj.X + 'px';
            menuobj.style.top = offset == 1 ? showobj.Y + 'px' : (offset == 2 || ((showobj.Y + showobj.h + menuobj.h > document.documentElement.scrollTop + document.documentElement.clientHeight) && (showobj.Y - menuobj.h >= 0)) ? (showobj.Y - menuobj.h) + 'px' : showobj.Y + showobj.h + 'px');
        } else if (offset == 3) {
            menuobj.style.left = (document.body.clientWidth - menuobj.clientWidth) / 2 + document.body.scrollLeft + 'px';
            menuobj.style.top = (document.body.clientHeight - menuobj.clientHeight) / 2 + document.body.scrollTop + 'px';
        }

        if (menuobj.style.clip && !is_opera) {
            menuobj.style.clip = 'rect(auto, auto, auto, auto)';
        }
    }
}

function hideMenu(layer) {
    if (isUndefined(layer)) layer = 0;
    if (jsmenu['active'][layer]) {
        try {
            $(jsmenu['active'][layer].ctrlkey).className = ctrlobjclassName;
        } catch (e) { }
        clearTimeout(jsmenu['timer'][jsmenu['active'][layer].ctrlkey]);
        jsmenu['active'][layer].style.display = 'none';
        if (is_ie && is_ie < 7 && jsmenu['iframe'][layer]) {
            jsmenu['iframe'][layer].style.display = 'none';
        }
        jsmenu['active'][layer] = null;
    }
}


function fetchOffset(obj) {
    var left_offset = obj.offsetLeft;
    var top_offset = obj.offsetTop;
    while ((obj = obj.offsetParent) != null) {
        left_offset += obj.offsetLeft;
        top_offset += obj.offsetTop;
    }
    return { 'left': left_offset, 'top': top_offset };
}

function ebygum(eventobj) {
    if (!eventobj || is_ie) {
        window.event.cancelBubble = true;
        return window.event;
    } else {
        if (eventobj.target.type == 'submit') {
            eventobj.target.form.submit();
        }
        eventobj.stopPropagation();
        return eventobj;
    }
}
//-------------------------------------------------------------/浮动展示--------------------------------------------------------------------

var xmlhttp;

function getReturn(Url)  //提交为aspx,aspx页面路径, 返回页面的值
{
    if (typeof XMLHttpRequest != "undefined") {
        xmlhttp = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) {
        var versions = ["MSXML2.XMLHttp.5.0", "MSXML2.XMLHttp.4.0", "MSXML2.XMLHttp.3.0", "MSXML2.XMLHttp", "Microsoft.XMLHttp"];
        for (var i = 0; i < versions.length; i++) {
            try {
                xmlhttp = new ActiveXObject(versions[i]);
                break;
            }
            catch (E) {
            }
        }
    }

    try {
        xmlhttp.open('GET', Url, false);
        xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
        xmlhttp.send(null);

        if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
            return xmlhttp.responseText;
        }
        else {
            return null;
        }
    }
    catch (e) {
        alert("你的浏览器不支持XMLHttpRequest对象, 请升级");
    }

    return null;
}

//--------------功能性脚本----------------
// 去掉字符串的头空格（左空格）
function LTrim(str) {
    var i;
    for (i = 0; i < str.length; i++) {
        if (str.charAt(i) != " ") break;
    }
    str = str.substring(i, str.length);
    return str;
}

// 去掉字符串的尾空格（右空格）
function RTrim(str) {
    var i;
    for (i = str.length - 1; i >= 0; i--) {
        if (str.charAt(i) != " ") break;
    }
    str = str.substring(0, i + 1);
    return str;
}

// 去掉字符串的头尾空格（左右空格）
function Trim(str) {
    return LTrim(RTrim(str));
}


//TR移动变色效果
function ShowSelect(obj, type) {
    if (obj.IsSelected == "0") {
        if (type == 0) {
            obj.style.backgroundColor = '#F7F7F7';
        } else if (type == 1) {
            obj.style.backgroundColor = '#FFFFFF';
        }
    }
}

//根据TR上的时间选择CHECKBOX
function CheckByRowID(RowID) {
    var InputList = document.getElementsByTagName("input");
    var InputAll = document.getElementById("chkall");
    var i = 0;

    for (var j = 0; j < InputList.length; j++) {
        if (InputList[j].type == "checkbox" && InputList[j].id != "chkall" && InputList[j].id.indexOf('disable') == -1 && InputList[j].id.indexOf('chk') != -1) {
            if (i == RowID) {
                if (InputList[j].mouse != 'over') {
                    InputList[j].checked = InputList[j].checked == true ? false : true;
                    if (InputList[j].checked == true) {
                        InputList[j].parentNode.parentNode.style.backgroundColor = '#F7F7F7';
                    } else {
                        InputList[j].parentNode.parentNode.style.backgroundColor = '#ffffff';
                    }
                }

                if (InputList[j].checked == true) {
                    InputList[j].parentNode.parentNode.IsSelected = "1";
                } else {
                    InputList[j].parentNode.parentNode.IsSelected = "0";
                }
            }
            i++;
        }
    }
} 
//向上事件
var index = 0;
var indexcount = 0
function CheckUp() {
    var pageindex = document.getElementById("PageIndex").value;
    var maxpageindex = document.getElementById("MaxPageIndex").value;
    indexcount = 0;
    count = 0;
    var ids = GetCheckedBox();
    if (ids == "0") {
        alert(document.getElementById("Alert_Str7").innerHTML);
        return false;
    } else if (count > 1) {
        alert(document.getElementById("Alert_Str8").innerHTML);
        return false;
    } else {
        if (index == 0) {
            if (pageindex == 0) {
                alert(document.getElementById("Alert_Str4").innerHTML);
                return false;
            } else {
                document.getElementById("PageIndex").value = parseInt(pageindex) - 1;
                document.getElementById("CheckedIDS").value = ids.replace('0,', '');
                return true;
            }
        } else {
            document.getElementById("CheckedIDS").value = ids.replace('0,', '');
            return true;
        }
    }
}
//向下事件
function CheckDown() {
    var pageindex = document.getElementById("PageIndex").value;
    var maxpageindex = document.getElementById("MaxPageIndex").value;
    indexcount = 0;
    count = 0;
    var ids = GetCheckedBox();
    if (ids == "0") {
        alert(document.getElementById("Alert_Str7").innerHTML);
        return false;
    } else if (count > 1) {
        alert(document.getElementById("Alert_Str8").innerHTML);
        return false;
    } else {
        if (index == indexcount - 1) {
            if (pageindex == maxpageindex) {
                alert(document.getElementById("Alert_Str5").innerHTML);
                return false;
            } else {
                document.getElementById("PageIndex").value = parseInt(pageindex) + 1;
                document.getElementById("CheckedIDS").value = ids.replace('0,', '');
                return true;
            }
        } else {
            document.getElementById("CheckedIDS").value = ids.replace('0,', '');
            return true;
        }
    }
}

//编辑事件
var count = 0;
function CheckEdit() {
    count = 0;
    var ids = GetCheckedBox();
    if (ids == "0") {
        alert("请选择一条您要编辑的记录！");
        return false;
    }
    else if (count > 1) {
        alert("您只能选择一条记录编辑！");
        return false;
    } else {
        document.getElementById("CheckedIDS").value = ids.replace('0,', '');
        return true;
    }
}
//删除事件
function CheckDel() {
    var ids = GetCheckedBox();
    if (ids == "0") {
        alert("请选择一条您要删除的记录！");
        return false;
    } else {
    if (confirm("该操作不可恢复,您确定要删除吗?")) {
            document.getElementById("CheckedIDS").value = ids.replace('0,', '');
            return true;
        } else {
            return false;
        }
    }
}
//查看广告预览调用代码
function GetAdsView() {
    if (CheckEdit()) {
        var txt = document.getElementById("CheckedIDS").value;
        var url = "Advertisement_Ads_Operate_DialogView.aspx?txt=" + escape(txt) + "&act=view&d=" + Date();

        if (navigator.appVersion.indexOf("MSIE") == -1) {
            window.open(url, 'newWin', 'modal=yes,width=650,height=480,top=200,left=300,resizable=no,scrollbars=no');
            return;
        } else {
            showModalDialog(url, '', 'dialogWidth:650px;dialogHeight:480px;')
        }
    }
    return false;
}
//获取全部选中CHECKBOX的值集合
function GetCheckedBox() {
    var ids = "0";
    var InputList = document.getElementsByTagName("input");
    var InputAll = document.getElementById("chkall");
    for (var j = 0; j < InputList.length; j++) {
        if (InputList[j].type == "checkbox" && InputList[j].id.indexOf('chk') != -1 && InputList[j].id != "ctl00_ContInfo_chkall") {
            if (InputList[j].checked == true) {
                ids += "," + InputList[j].value;
                count++;
                index = indexcount;
            }
            indexcount++;
        }
    }
    return ids;
}
//全选事件
function CheckEditAll(obj) {
    count = 0;
    var ids = GetCheckedBox();
    if (count <= 0) {
        alert("请选择一条您要编辑的记录！");
        return false;
    }
    else {
        document.getElementById("CheckedIDS").value = ids.replace('0,', '');
        return true;
    }
}

//选中全部CHECKBOX
function CheckMinoAll() {
    var InputList = document.getElementsByTagName("input");
    var InputAll = document.getElementById("ctl00_ContInfo_chkall");
    for (var j = 0; j < InputList.length; j++) {
        if (InputList[j].type == "checkbox" && InputList[j].id.indexOf('chk') != -1) {
            InputList[j].checked = InputAll.checked == true ? true : false;
            if (InputList[j].checked == true) {
                InputList[j].parentNode.parentNode.IsSelected = "1";
            } else {
                InputList[j].parentNode.parentNode.IsSelected = "0";
            }
        }
    }
}
//批量操作事件
function CheckSelect() {
    var ids = GetCheckedBox();
    if (ids == "0") {
        alert("请选择一条您要操作的记录!");
        return false;
    } else {
    document.getElementById("ctl00$ContInfo$CheckedIDS").value = ids.replace('0,', '');
        return true;
    }
}
// 检查日期型
// obj          要检查的控件
// Isfoucs      验证失败时是否控制焦点
// IsMustInput  是否必须输入
//------------------------------------------------------------------
function CheckDate(obj, Isfoucs, IsMustInput) {
    if (obj.value == "") {
        if (IsMustInput) {
            alert("必须输入!");
            if (Isfoucs) obj.select();
            return false;
        }
    }
    else {
        var re = /^^((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$/;
        if (!re.test(obj.value)) {
            alert("请输入日期类型!");
            if (Isfoucs) {
                obj.select();
            }
            else {
                obj.value = "";
            }
            return false;
        }
    }
    return true;
}

//编辑页面加载后自动给每行加不同样式
function InitTrClass() {
    var flag = 0;
    var node = childs(document.getElementById("OperateTable").childNodes)[0].childNodes;
    for (var i = 0; i < node.length; i++) {
        if (node[i].tagName == "TR" && node[i].style.display != "none") {
            if (flag == 0)
                node[i].className = "F7tr";
            else
                node[i].className = "FFtr";

            flag = 1 - flag;
        }
    }
}

//编辑页面加载后自动给每行加不同样式
function InitTrClassById(id) {
    var flag = 0;
    var node = childs(document.getElementById(id).childNodes)[0].childNodes;
    for (var i = 0; i < node.length; i++) {
        if (node[i].tagName == "TR" && node[i].style.display != "none") {
            if (flag == 0)
                node[i].className = "F7tr";
            else
                node[i].className = "FFtr";

            flag = 1 - flag;
        }
    }
}
//兼容FF下的childNodes
function childs(nodes) {
    if (!nodes.length)
        return [];
    var ret = [];
    for (var i = 0; i < nodes.length; i++) {
        if (nodes[i].nodeType != 1)
            continue;
        ret.push(nodes[i]);
    }
    return ret;
}




function loading() {
    var body = document.getElementsByTagName("body")[0];

    var bodySize = [];
    bodySize[0] = (document.documentElement.scrollWidth > document.documentElement.clientWidth) ? document.documentElement.scrollWidth : document.documentElement.clientWidth; //如果滚动条的宽度大于页面的宽度，取得滚动条的宽度，否则取页面宽度
    bodySize[1] = (document.documentElement.scrollHeight > document.documentElement.clientHeight) ? document.documentElement.scrollHeight : document.documentElement.clientHeight; //如果滚动条的高度大于页面的高度，取得滚动条的高度，否则取高度
    var div = document.createElement("div");
    div.style.position = "absolute";
    div.style.top = "50%";
    div.style.left = "50%";
    div.style.margin = "-50px 0 0 -100px";
    div.style.padding = "15px";
    div.style.border = "0px solid #B2D0F7";
    div.style.color = "#003366";
    div.style.font = "bold 14px verdana,tahoma,helvetica";
    div.style.zIndex = '10002';
    div.style.textAlign = "center";
    div.innerHTML = "<img src='../images/loading.gif'/>";
    div.id = "loading";
    body.appendChild(div);
    div.style.display = "none";

    var divmask = document.createElement('div');
    divmask.style.position = 'absolute';
    divmask.style.width = bodySize[0] + "px";
    divmask.style.height = bodySize[1] + "px";
    divmask.style.top = "0px";
    divmask.style.left = "0px";
    divmask.style.zIndex = '10001';
    divmask.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=60,finishOpacity=100,style=0)';
    divmask.style.opacity = 0.9;
    divmask.style.background = "#ffffff";
    divmask.id = "loading_mask";
    body.appendChild(divmask);
    divmask.style.display = "none";
}

//等待页面
function Msg_show(msgInfo, pageErr, skipurl) {

    msg_loading(msgInfo, pageErr);
    if (scorebar == 0) {
        $("loading_masks").style.display = "block";
        $("loading_success").style.display = "block";
    } else {
        $("loading_masks").style.display = "none";
        $("loading_success").style.display = "none";
    }

    if (skipurl != "") {
        setTimeout("window.location.href = '" + skipurl + "';", 3000);
    } else {
        if (scorebar == 0) {
            setTimeout("Msg_show('" + msgInfo + "','" + pageErr + "','" + skipurl + "');scorebar = scorebar + 1;", 3000);
        }
    }
}
